\(\int x^2 (a+b \arctan (c x^3)) \, dx\) [99]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 36 \[ \int x^2 \left (a+b \arctan \left (c x^3\right )\right ) \, dx=\frac {1}{3} x^3 \left (a+b \arctan \left (c x^3\right )\right )-\frac {b \log \left (1+c^2 x^6\right )}{6 c} \]

[Out]

1/3*x^3*(a+b*arctan(c*x^3))-1/6*b*ln(c^2*x^6+1)/c

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4946, 266} \[ \int x^2 \left (a+b \arctan \left (c x^3\right )\right ) \, dx=\frac {1}{3} x^3 \left (a+b \arctan \left (c x^3\right )\right )-\frac {b \log \left (c^2 x^6+1\right )}{6 c} \]

[In]

Int[x^2*(a + b*ArcTan[c*x^3]),x]

[Out]

(x^3*(a + b*ArcTan[c*x^3]))/3 - (b*Log[1 + c^2*x^6])/(6*c)

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 4946

Int[((a_.) + ArcTan[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTan[c*x^
n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTan[c*x^n])^(p - 1)/(1 + c^2*x^(2*n))),
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{3} x^3 \left (a+b \arctan \left (c x^3\right )\right )-(b c) \int \frac {x^5}{1+c^2 x^6} \, dx \\ & = \frac {1}{3} x^3 \left (a+b \arctan \left (c x^3\right )\right )-\frac {b \log \left (1+c^2 x^6\right )}{6 c} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.14 \[ \int x^2 \left (a+b \arctan \left (c x^3\right )\right ) \, dx=\frac {a x^3}{3}+\frac {1}{3} b x^3 \arctan \left (c x^3\right )-\frac {b \log \left (1+c^2 x^6\right )}{6 c} \]

[In]

Integrate[x^2*(a + b*ArcTan[c*x^3]),x]

[Out]

(a*x^3)/3 + (b*x^3*ArcTan[c*x^3])/3 - (b*Log[1 + c^2*x^6])/(6*c)

Maple [A] (verified)

Time = 0.59 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00

method result size
parts \(\frac {x^{3} a}{3}+\frac {b \arctan \left (c \,x^{3}\right ) x^{3}}{3}-\frac {b \ln \left (c^{2} x^{6}+1\right )}{6 c}\) \(36\)
derivativedivides \(\frac {a c \,x^{3}+b \left (c \,x^{3} \arctan \left (c \,x^{3}\right )-\frac {\ln \left (c^{2} x^{6}+1\right )}{2}\right )}{3 c}\) \(39\)
default \(\frac {a c \,x^{3}+b \left (c \,x^{3} \arctan \left (c \,x^{3}\right )-\frac {\ln \left (c^{2} x^{6}+1\right )}{2}\right )}{3 c}\) \(39\)
parallelrisch \(-\frac {-2 x^{3} \arctan \left (c \,x^{3}\right ) b c -2 a c \,x^{3}+b \ln \left (c^{2} x^{6}+1\right )}{6 c}\) \(39\)
risch \(-\frac {i x^{3} b \ln \left (i c \,x^{3}+1\right )}{6}+\frac {i b \,x^{3} \ln \left (-i c \,x^{3}+1\right )}{6}+\frac {x^{3} a}{3}-\frac {b \ln \left (-c^{2} x^{6}-1\right )}{6 c}\) \(59\)

[In]

int(x^2*(a+b*arctan(c*x^3)),x,method=_RETURNVERBOSE)

[Out]

1/3*x^3*a+1/3*b*arctan(c*x^3)*x^3-1/6*b*ln(c^2*x^6+1)/c

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.08 \[ \int x^2 \left (a+b \arctan \left (c x^3\right )\right ) \, dx=\frac {2 \, b c x^{3} \arctan \left (c x^{3}\right ) + 2 \, a c x^{3} - b \log \left (c^{2} x^{6} + 1\right )}{6 \, c} \]

[In]

integrate(x^2*(a+b*arctan(c*x^3)),x, algorithm="fricas")

[Out]

1/6*(2*b*c*x^3*arctan(c*x^3) + 2*a*c*x^3 - b*log(c^2*x^6 + 1))/c

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 102 vs. \(2 (29) = 58\).

Time = 20.58 (sec) , antiderivative size = 102, normalized size of antiderivative = 2.83 \[ \int x^2 \left (a+b \arctan \left (c x^3\right )\right ) \, dx=\begin {cases} \frac {a x^{3}}{3} + \frac {b x^{3} \operatorname {atan}{\left (c x^{3} \right )}}{3} + \frac {b \sqrt {- \frac {1}{c^{2}}} \operatorname {atan}{\left (c x^{3} \right )}}{3} - \frac {b \log {\left (x - \sqrt [6]{- \frac {1}{c^{2}}} \right )}}{3 c} - \frac {b \log {\left (4 x^{2} + 4 x \sqrt [6]{- \frac {1}{c^{2}}} + 4 \sqrt [3]{- \frac {1}{c^{2}}} \right )}}{3 c} & \text {for}\: c \neq 0 \\\frac {a x^{3}}{3} & \text {otherwise} \end {cases} \]

[In]

integrate(x**2*(a+b*atan(c*x**3)),x)

[Out]

Piecewise((a*x**3/3 + b*x**3*atan(c*x**3)/3 + b*sqrt(-1/c**2)*atan(c*x**3)/3 - b*log(x - (-1/c**2)**(1/6))/(3*
c) - b*log(4*x**2 + 4*x*(-1/c**2)**(1/6) + 4*(-1/c**2)**(1/3))/(3*c), Ne(c, 0)), (a*x**3/3, True))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.06 \[ \int x^2 \left (a+b \arctan \left (c x^3\right )\right ) \, dx=\frac {1}{3} \, a x^{3} + \frac {{\left (2 \, c x^{3} \arctan \left (c x^{3}\right ) - \log \left (c^{2} x^{6} + 1\right )\right )} b}{6 \, c} \]

[In]

integrate(x^2*(a+b*arctan(c*x^3)),x, algorithm="maxima")

[Out]

1/3*a*x^3 + 1/6*(2*c*x^3*arctan(c*x^3) - log(c^2*x^6 + 1))*b/c

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.11 \[ \int x^2 \left (a+b \arctan \left (c x^3\right )\right ) \, dx=\frac {2 \, a c x^{3} + {\left (2 \, c x^{3} \arctan \left (c x^{3}\right ) - \log \left (c^{2} x^{6} + 1\right )\right )} b}{6 \, c} \]

[In]

integrate(x^2*(a+b*arctan(c*x^3)),x, algorithm="giac")

[Out]

1/6*(2*a*c*x^3 + (2*c*x^3*arctan(c*x^3) - log(c^2*x^6 + 1))*b)/c

Mupad [B] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.97 \[ \int x^2 \left (a+b \arctan \left (c x^3\right )\right ) \, dx=\frac {a\,x^3}{3}-\frac {b\,\ln \left (c^2\,x^6+1\right )}{6\,c}+\frac {b\,x^3\,\mathrm {atan}\left (c\,x^3\right )}{3} \]

[In]

int(x^2*(a + b*atan(c*x^3)),x)

[Out]

(a*x^3)/3 - (b*log(c^2*x^6 + 1))/(6*c) + (b*x^3*atan(c*x^3))/3